<?php

class openapi_api_params_v1_activity extends openapi_api_params_abstract implements openapi_api_params_interface{

    public function checkParams($method,$params,&$sub_msg,$defined_params=array(),$dataType='kv'){
        if(parent::checkParams($method,$params,$sub_msg,$defined_params,$dataType)){
            return true;
        }else{
            return false;
        }
    }

    public function getAppParams($method){
        $params = array(
            'getList'=>array(
                'tid' => array('type'=>'int','name'=>'类别名'),
                'priceid'  => array('type'=>'int','name'=>'价格区间'),
            ),
            'actinfo'=>array(
                'act_id' => array('required'=>'true','type'=>'int','name'=>'团购活动ID'),
                //'goods_id' => array('type'=>'int','name'=>'团购活动对应的商品ID'),
            ),
            'typelist'=>array(
                'randnum' => array('type'=>'string','name'=>'任意参数'),
            ),
        );

        return $params[$method];
    }
    
    public function description($method){
        $desccription = array(
            'getList'=>array(
                'name'        =>'团购列表',
                'description' =>'团购列表,类别名不填表示所有类别;价格区间为空或1~5共6种区间,为空表示所有区间,1为0~99,后面依次为100~199,200~499,500~999,大于1000',
            ),
            'actinfo'=>array(
                'name'        =>'团购详情',
                'description' =>'团购详情,需要团购活动id,必填',
            ),
            'typelist'=>array(
                'name'        =>'团购类别列表',
                'description' =>'团购类别列表',
            ),
        );
        return $desccription[$method];
    }

}